<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>新闻爬虫</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}">
    <link rel="stylesheet" th:href="@{/css/amazeui.css}">
    <script th:src="@{/js/jquery.js}"></script>
    <script th:src="@{/js/bootstrap.js}"></script>
</head>
<body style="background-color:#eee;">

<div th:replace="~{commons/admin/topbar::top-bar}"></div>


<div class="row">
    <!--    引入共有侧边栏-->
    <div th:replace="~{commons/admin/leftbar::left-bar}"></div>

    <!--主题内容-->
    <div class="col-xs-12 col-sm-9 col-md-10 pull-right" style="background-color:#FFFFFF;margin-top: 60px;">
        <div class="row bg-info text-center">
            <h4>爬取新闻</h4>
        </div><br>


        <div class="container-fluid" style="min-height: 800px;">
            <div class="row">
                <div class="well">
                    <button id="getNews">开始爬取</button>
                    <button id="publishAllRawNews">发布所有新闻</button>
                    注意：由于原网站限制，爬取不一定保证成功。

                </div>
            </div>
        </div><br>
        <div class="pull-right"><a href="" target="_blank">软件18-2班第三组</a>&nbsp;&nbsp;</div>
    </div>

</div>


</body>
<script>

    $("#getNews").click(function(){
        console.log("开始爬取");
        $.get("/news/getRawItems",function (data) {
            console.log(data);
        });
    });
    
    $("#publishAllRawNews").click(function () {
        $.get("/news/publishAllRawNews",function (data) {
            console.log(data);
        });
    });


</script>
</html>